import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';

import 'element-ui/lib/theme-chalk/index.css';
import * as echarts from "echarts"
import axios from 'axios'
// 引入echats
Vue.prototype.$echarts = echarts
// 引入elementUI
Vue.use(ElementUI);
Vue.config.productionTip = false
// 配置请求情况
Vue.prototype.$axios = axios
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

axios.defaults.crossDomain = true;  // 开启跨域
// 开启这个同样会导致跨域问题
// axios.defaults.withCredentials = true;  // 默认允许cros跨域 并设置访问权限 允许跨域s携带cookie信息
axios.defaults.baseURL ="https://www.ym94.cn/bot/"  // 重新设置路径
// axios.defaults.baseURL="http://localhost:5000"
axios.defaults.adapter = require('axios/lib/adapters/http');   // 兼容elect
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
